// 获取zTree选中id
function getZtreeCheckedIdArr() {
    var arr = new Array();
    var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
    var nodes = treeObj.getCheckedNodes(true);
    for (var i = 0; i < nodes.length; i++) {
        arr[i] = nodes[i].id;
    }
    return arr;
}